package com.luyuan.crm.question.service.impl;

import java.util.List;

import org.hibernate.criterion.Order;

import com.luyuan.crm.question.model.QuestionExtend;
import com.luyuan.crm.question.service.QuestionExtendService;
import com.ruijie.foundation.dao.support.HibernateEntityDao;
import com.ruijie.foundation.query.Page;
import com.ruijie.foundation.query.criteria.CriteriaQueryTemplate;
import com.ruijie.foundation.query.criteria.CriteriaTemplate;

public class QuestionExtendServiceImpl extends HibernateEntityDao<QuestionExtend> implements QuestionExtendService {

    @Override
    public Page pagedQuery(CriteriaTemplate criteria, int pageNo, int pageSize, List<Order> orders) {
        CriteriaQueryTemplate cqt = new CriteriaQueryTemplate(getSessionFactory());
        return cqt.pagedQuery(criteria, pageNo, pageSize, orders);
    }

    @Override
    public void removeById(int id) {
        remove(id);
    }

    @Override
    public QuestionExtend getById(int id) {
        return safeGet(id);
    }

    @Override
    public void saveQuestionExtend(QuestionExtend extend) {
        save(extend);
    }

    @Override
    public void updateQuestionExtend(QuestionExtend extend) {
        update(extend);
    }

}
